package com.zimin.authorize.util;

import com.zimin.authorize.constant.AuthorizeConstant;

import java.util.List;

/**
 *  授权 工具类
 * @author : zimin
 * @since : 2020/12/20
 */
public class AuthorizeUtil {

    public static boolean isAdmin(Long userId) {
        return userId != null && 1L == userId;
    }

    /**
     * 授权 管理员菜单数据权限
     */
    public static List<String> allMenu() {
        return List.of(AuthorizeConstant.ADMIN_MENU_PERMISSIONS);
    }

    /**
     * 授权 管理员角色数据权限
     */
    public static List<String> allRole() {
        return List.of(AuthorizeConstant.ADMIN_ROLE_PERMISSIONS);
    }


}
